package cn.kgc.spring09.service.impl;

import cn.kgc.spring09.mapper.EmpMapper;
import cn.kgc.spring09.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: mosin
 * @version: v1.0  2022/12/7
 */
@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private EmpMapper empMapper;


    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public Integer deleteByEmpNo(String empNo) {
        Integer integer = empMapper.deleteByEmpNo(empNo);
        return integer;
    }
}
